From 2dcebc270eb1603d27436532cd40d8b682a25290 Mon Sep 17 00:00:00 2001 From: "kfraser@localhost.localdomain" Date: Thu, 10 Aug 2006 10:37:15 +0100 Subject: [PATCH] Fix 2 issues when creating HVM guests: 1) xend can't start due to xend-config.sxp 2) qemu dm option vncunused should be effective only when vnc is turned on. Signed-off-by: Xin Li --- tools/examples/xend-config.sxp | 2 +- tools/python/xen/xend/image.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/examples/xend-config.sxp b/tools/examples/xend-config.sxp index b11a80fc1b..9d1be3fb56 100644 --- a/tools/examples/xend-config.sxp +++ b/tools/examples/xend-config.sxp @@ -54,7 +54,7 @@ # (xend-relocation-hosts-allow '^localhost$ ^.*\.example\.org$') # #(xend-relocation-hosts-allow '') -(xend-relocation-hosts-allow '^localhost$ ^localhost\.localdomain$') +(xend-relocation-hosts-allow '^localhost$ ^localhost\\.localdomain$') # The limit (in kilobytes) on the size of the console buffer #(console-limit 1024) diff --git a/tools/python/xen/xend/image.py b/tools/python/xen/xend/image.py index 93f1c9f810..64fb810944 100644 --- a/tools/python/xen/xend/image.py +++ b/tools/python/xen/xend/image.py @@ -251,7 +251,7 @@ class HVMImageHandler(ImageHandler): def parseDeviceModelArgs(self, imageConfig, deviceConfig): dmargs = [ 'boot', 'fda', 'fdb', 'soundhw', 'localtime', 'serial', 'stdvga', 'isa', 'vcpus', - 'acpi', 'usb', 'usbdevice'] + 'acpi', 'usb', 'usbdevice'] ret = [] for a in dmargs: v = sxp.child_value(imageConfig, a) @@ -305,9 +305,6 @@ class HVMImageHandler(ImageHandler): def configVNC(self, config): # Handle graphics library related options vnc = sxp.child_value(config, 'vnc') - vncdisplay = sxp.child_value(config, 'vncdisplay', - int(self.vm.getDomid())) - vncunused = sxp.child_value(config, 'vncunused') sdl = sxp.child_value(config, 'sdl') ret = [] nographic = sxp.child_value(config, 'nographic') @@ -315,9 +312,12 @@ class HVMImageHandler(ImageHandler): ret.append('-nographic') return ret if vnc: + vncdisplay = sxp.child_value(config, 'vncdisplay', + int(self.vm.getDomid())) ret = ret + ['-vnc', '%d' % vncdisplay, '-k', 'en-us'] - if vncunused: - ret += ['-vncunused'] + vncunused = sxp.child_value(config, 'vncunused') + if vncunused: + ret += ['-vncunused'] return ret def createDeviceModel(self): -- 2.30.2